API Documentation
AnyShake Observer offers RESTful APIs that allows users to access the station and seismic data. This API documentation, generated by Swagger, is embedded within the AnyShake Observer's binary file.
Enable Debug Mode
It's strongly recommended to disable debug mode in production environment!
To enable debug mode, set the server_settings.debug
option to true
in the configuration file. For example:
{
// ... Your other configurations
"server_settings": {
"host": "0.0.0.0",
"port": 8073,
"cors": true,
"debug": true, // Enables debug mode
"rate": 30,
"restrict": false
}
}
Visit API Documentation
Once debug mode is enabled, access the API documentation by visiting the /api/v1/devel
endpoint.
For instance, with a base URL of http://127.0.0.1:8073
, access the API documentation at http://127.0.0.1:8073/api/v1/devel
.
OpenAPI Specification
The OpenAPI document is available at the /api/v1/devel/doc.json
endpoint, allowing you to import it into various API platforms.
For example, with the same base URL, retrieve the OpenAPI document at http://127.0.0.1:8073/api/v1/devel/doc.json
.
For API testing, We recommend using Hoppscotch, an open-source & powerful API development environment.